package com.lyf.boot.annotation;

import com.lyf.boot.validate.JsonValidator;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

/**
 * @author Luyufan
 * @date 2023/5/30 15:11
 */
@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = {JsonValidator.class})
public @interface JsonStr {

    String message() default "The JSON string is not in the correct format";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

}
